<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupGLFrame</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
<style type="text/css">
.style1 {
	font-size: large;
}
</style>
</head>
<body>
<div id="navigation">
  <ul>
    <li><a href="#Creation">Creation</a></li>
    <li><a href="#Attributes">Attributes</a></li>
    <li><a href="#Callbacks">Callbacks</a></li>
    <li><a href="#Notes">Notes</a></li>
    <li><a href="#Examples">Examples</a></li>
    <li><a href="#SeeAlso">See Also</a></li>
  </ul>
</div>

<h2>IupGLFrame <span class="style1">(since 3.11)</span></h2>

  <p>
  Creates an embedded OpenGL container, which draws a frame with 
  a title around its child. It inherits from <a href="iupglsubcanvas.html">IupGLSubCanvas</a>. It exists only 
  inside an
<a href="iupglcanvasbox.html">IupGLCanvasBox</a>.</p>

<h3><a name="Creation">Creation</a></h3>
<pre>Ihandle* IupGLFrame(Ihandle *<strong>child</strong>); [in C]
iup.glframe{<strong>child</strong>: ihandle} -&gt; (<strong>elem</strong>: ihandle) [in Lua]
glframe(<strong>child</strong>) [in LED]</pre>
  <p><strong>child</strong>: Identifier of an interface element which will receive the frame 
	around. It can be NULL (nil in Lua), or empty in LED.</p>
  <p>
  <u>Returns:</u> the identifier of the 
  created element, or NULL if an error occurs.</p>

<h3><a name="Attributes">Attributes</a></h3>


<p>The 
  <strong>IupGLFrame</strong> element handle all attributes defined for a
<a href="iupglsubcanvas.html">IupGLSubCanvas</a> control.</p>
<blockquote>
  <hr>
</blockquote>



<p><b>ALIGNMENT</b> (<font size="3">non inheritable</font>): horizontal and 
vertical alignment. Possible values: &quot;ALEFT&quot;, &quot;ACENTER&quot; and &quot;ARIGHT&quot;,&nbsp; 
combined to &quot;ATOP&quot;, &quot;ACENTER&quot; and &quot;ABOTTOM&quot;. Default: &quot;ALEFT:ACENTER&quot;. Partial 
values are also accepted, like &quot;ARIGHT&quot; or &quot;:ATOP&quot;, the other value will be 
obtained 
from the default value. </p>

  <p>
  <strong>BACKCOLOR</strong> (<font SIZE="3">non inheritable</font>): color 
  used as background when TITLE and IMAGE are 
not defined. Can have an alpha component. Default: NULL. Used instead of BGCOLOR 
  to avoid inheritance problems.</p>
<p><strong>BACKIMAGE</strong> (<font SIZE="3">non inheritable</font>): image 
name to be used as background when TITLE and IMAGE are not defined.&nbsp; It 
will be zoomed to fill the background (it does not includes the border). Use <a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also <a href="../elem/iupimage.html">IupImage</a>. 
(Since 3.11.1)</p>
  <p><strong>BACKIMAGEINACTIVE</strong> (<font SIZE="3">non inheritable</font>): 
  background image name of the element when inactive. If it is not defined then the 
  BACKIMAGE 
  is used and its colors will be replaced by a modified version creating the 
  disabled effect. (since 3.11.2)</p>

  
<p><a href="../attrib/iup_expand.html">EXPAND</a> (<font SIZE="3">non inheritable</font>):
  The default value is &quot;YES&quot;.</p>
<p><strong>FORECOLOR</strong> (<font SIZE="3">non inheritable</font>): Text 
color. Can have an alpha component. Default: &quot;0 0 0&quot;. Used instead of 
FGCOLOR to avoid inheritance problems. </p>
<p><strong>FRAMECOLOR</strong> (<font SIZE="3">non inheritable</font>): color 
used to draw the frame border. Can have an alpha component. Default: &quot;50 150 
255&quot;.&nbsp; Used instead of BORDERCOLOR to avoid inheritance problems.</p>
<p><strong>FRAMEWIDTH</strong> (<font SIZE="3">non inheritable</font>): line 
width of the frame border. Default: 1.&nbsp; Used instead of BORDERWIDTH to 
avoid inheritance problems.</p>


  <p><strong>IMAGE</strong> (<font SIZE="3">non inheritable</font>):
  Image name. Use
	<a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also
	<a href="../elem/iupimage.html">IupImage</a>.</p>
<p><strong>IMAGEHIGHLIGHT</strong> (<font SIZE="3">non inheritable</font>): 
Image name of the element in highlight state. If it is not defined then the 
IMAGE is used.</p>
  <p><strong>IMAGEINACTIVE</strong> (<font SIZE="3">non inheritable</font>): 
  Image name of the element when inactive. If it is not defined then the IMAGE 
  is used and its colors will be replaced by a modified version creating the 
  disabled effect. </p>

  
<p><strong>IMAGEPRESS </strong>(<font size="3">non inheritable</font>): Image 
name of the element in pressed state. If it is not defined then the IMAGE is 
used.</p>

<p><strong>IMAGEPOSITION </strong>(<font size="3">non inheritable</font>): 
Position of the image relative to the text when both are defined. Can be: LEFT, 
RIGHT, TOP, BOTTOM. Default: LEFT.</p>
<p><strong>MOVEABLE</strong> (<font SIZE="3">non inheritable</font>): enable the 
frame to be interactively moved when it is a direct child of the 
IupGLCanvasBox. Default: NO.</p>
<p><strong>MOVETOTOP</strong> (<font SIZE="3">non inheritable</font>): when 
MOVEABLE=Yes and the frame is moved then its ZORDER is also set to TOP. (Since 
3.11.1)</p>

  
<p><b>PADDING</b> (<font SIZE="3">non inheritable</font>): internal margin for 
the title area. Default value: &quot;2x0&quot;.</p>


<p><strong>CPADDING</strong>: same as PADDING but using the units of the <strong>
	SIZE</strong> attribute. It will actually set the PADDING attribute. (since 
3.29)</p>


<p><strong>SPACING</strong> (<font SIZE="3">non inheritable</font>): defines the spacing between the 
image and the title. Default: &quot;2&quot;.</p>

  
  <p><strong>CSPACING</strong>: same as SPACING but using the units of the 
  vertical part of the <strong>
	SIZE</strong> attribute. It will actually set the SPACING attribute. (since 
  3.29)</p>

  
  <p><a href="../attrib/iup_title.html">TITLE</a> (<font SIZE="3">non inheritable</font>): 
  Text the user will see at the top of the frame.&nbsp;</p>
<p><strong>TITLEBACKIMAGE</strong> (<font SIZE="3">non inheritable</font>): 
image name to be used as background on the title area. Works only when 
TITLEBOX=Yes. Use <a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also <a href="../elem/iupimage.html">IupImage</a>. 
(Since 3.11.1)</p>
  <p><strong>TITLEBACKIMAGEINACTIVE</strong> (<font SIZE="3">non inheritable</font>): 
  background image name of the element when inactive. If it is not defined then the 
  TITLEBACKIMAGE 
  is used and its colors will be replaced by a modified version creating the 
  disabled effect.&nbsp; (Since 3.11.2) </p>

  
<p><strong>TITLEBOX</strong> (<font SIZE="3">non inheritable</font>): enable a 
different visual style for the frame. Instead of the traditional round frame 
that starts and ends at the title area, it will draw a filled box for the title 
area and a regular rectangle around the child. Default: NO.</p>
<p><strong>TITLEOFFSET</strong> (<font SIZE="3">non inheritable</font>): 
horizontal offset from the left border to start the title area. Default: 5.</p>
  <blockquote>
  <hr>
</blockquote>
<p>
<a href="../attrib/iup_clientsize.html">CLIENTSIZE</a>, 
	<a href="../attrib/iup_clientoffset.html">CLIENTOFFSET</a>: 
also accepted.</p>

<h3><a name="Callbacks">Callbacks</a></h3>


<p>The 
  <strong>IupGLFrame</strong> element handle all callbacks defined for the
<strong>IupGLSubCanvas</strong> control.</p>
<blockquote>
  <hr>
</blockquote>

<p><strong>MOVE_CB</strong>: Called after the frame was moved on the <strong>
IupGLCanvasBox</strong>, when MOVEABLE=Yes. The 
coordinates are the same as the <a href="../attrib/iup_position.html">POSITION</a> 
attribute.</p>
<pre>int function(Ihandle *<strong>ih</strong>, int <strong>x</strong>, int <strong>y</strong>); <em>[in C]</em><br><b>elem</b>:trayclick_cb(<strong>x</strong>, <strong>y</strong>: number) -&gt; (<strong>ret</strong>: number) <em>[in Lua]</em></pre>
<p class="info"><strong>ih</strong>: identifier of the element that activated 
the event.<br>
<strong>x</strong>, <strong>y</strong>: coordinates of the new position. </p>


<h3><a name="Notes">Notes</a></h3>


<p>The <strong>IupGLFrame</strong> can contain text and image simultaneously at 
the title area. 
</p>
<p>The frame can be created with no elements and be dynamic filled using
  <a href="../func/iupappend.html">IupAppend</a> or
<a href="../func/iupinsert.html">IupInsert</a>.&nbsp;</p>

</body>

</html>